projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52ba24b
)
Ignore invalid base64 encoded embedded images
author
Lars Magne Ingebrigtsen
<larsi@gnus.org>
Sun, 20 Mar 2016 12:57:11 +0000
(13:57 +0100)
committer
Lars Magne Ingebrigtsen
<larsi@gnus.org>
Sun, 20 Mar 2016 12:58:04 +0000
(13:58 +0100)
* lisp/net/shr.el (shr-image-from-data): Ignore invalid base64
encoded embedded images (bug#22928).
(cherry picked from commit
f2da80d0e1ccd121c4891e869a45aeb9c6b1795d
)
Backport:
lisp/net/shr.el
patch
|
blob
|
history
diff --git
a/lisp/net/shr.el
b/lisp/net/shr.el
index 900b8ec3f5cf393e0b02127bf313b8fb07c3c0bf..07fcbebce087c133fd8c2cbaf2fb255ad7c98444 100644
(file)
--- a/
lisp/net/shr.el
+++ b/
lisp/net/shr.el
@@
-924,7
+924,8
@@
If EXTERNAL, browse the URL using `shr-external-browser'."
(let ((param (match-string 4 data))
(payload (url-unhex-string (match-string 5 data))))
(when (string-match "^.*\\(;[ \t]*base64\\)$" param)
- (setq payload (base64-decode-string payload)))
+ (setq payload (ignore-errors
+ (base64-decode-string payload))))
payload)))
;; Behind display-graphic-p test.